import Vue from 'vue'
import Router from 'vue-router'
import Process from '@/components/Process.vue'
  import Details from '@/components/process/Details.vue'
    import Detail from "@/components/process/details/Detail.vue"
    import User from "@/components/process/details/User.vue"
  import Form from '@/components/process/Form.vue'
  import Polish from '@/components/process/Polish.vue'
  import Recommend from '@/components/process/Recommend.vue'
  import Translation from '@/components/process/Translation.vue'
  import Typesetting from '@/components/process/Typesetting.vue'
  import Result from '@/components/process/Result.vue'
  import Panalysis from '@/components/process/Analysis.vue'
import Wait from '@/components/Wait.vue'
  import Distribution from '@/components/wait/Distribution.vue'
import Complete from '@/components/Complete.vue'
  import Contact from '@/components/complete/Contact.vue'
  import Resulta from '@/components/complete/Result.vue'
import Paying from '@/components/Paying.vue'
  import Contacta from '@/components/paying/Contact.vue'
import Analysis from '@/components/Analysis.vue'
  import Detailsa from '@/components/analysis/Details.vue'
  import Contactb from '@/components/analysis/Contact.vue'
  import Communication from '@/components/analysis/communication.vue'
import Setting from '@/components/Setting.vue'
  import Positiona from '@/components/setting/Position.vue'
  import Team from '@/components/setting/Team.vue'
  import Manage from '@/components/setting/Manage.vue'
import Service from '@/components/service/index.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Process',
      component: Process,
      redirect: '/process',
    },
    {
      path: '/service',
      name: 'Service',
      component: Service,
    },
    {
      path: '/process',
      component: Process,
      children: [
        {
          path: '/process/details',
          component: Details,
          redirect: '/process/details/detail',
          children: [
            {
              path: '/process/details/detail',
              component:Detail
            },
            {
              path: '/process/details/user',
              component:User
            }
          ]
        },
        {
          path: '/process/form',
          component: Form
        },
        {
          path: '/process/polish',
          component: Polish
        },
        {
          path: '/process/recommend',
          component: Recommend
        },
        {
          path: '/process/translation',
          component: Translation
        },
        {
          path: '/process/typesetting',
          component: Typesetting
        },
        {
          path: '/process/result',
          component: Result
        },
        {
          path: '/process/analysis',
          component: Panalysis
        }
      ]
    },
    {
      path: '/wait',
      component: Wait,
      redirect: '/wait/details',
      children: [
        {
          path: '/wait/details',
          component: Detail
        },
        {
          path: '/wait/user',
          component: User
        },
        {
          path: '/wait/distribution',
          component: Distribution
        }
      ]
    },
    {
      path: '/complete',
      component: Complete,
      redirect: '/complete/details',
      children: [
        {
          path: '/complete/details',
          component: Detail
        },
        {
          path: '/complete/user',
          component: User
        },
        {
          path: '/complete/result',
          component: Resulta
        },
        {
          path: '/complete/contact',
          component: Contact
        }
      ]
    },
    {
      path: '/paying',
      component: Paying,
      redirect: '/paying/details',
      children: [
        {
          path: '/paying/details',
          component: Detail
        },
        {
          path: '/paying/user',
          component: User
        },
        {
          path: '/paying/contact',
          component: Contacta
        }
      ]
    },
    {
      path: '/analysis',
      component: Analysis,
      redirect: '/analysis/details',
      children: [
        {
          path: '/analysis/details',
          component: Detailsa
        },
        {
          path: '/analysis/user',
          component: User
        },
        {
          path: '/analysis/contact',
          component: Contactb
        },
        {
          path: '/analysis/communication',
          component: Communication
        }
      ]
    },
    {
      path: '/setting',
      component: Setting,
      redirect: '/setting/position',
      children: [
        {
          path: '/setting/position',
          component: Positiona
        },
        {
          path: '/setting/team',
          component: Team
        },
        {
          path: '/setting/manage',
          component: Manage
        }
      ]
    }
  ]
})
